<html>
  <head>
    <meta name="viewport" content="width=device-width, initial-scale=1">
	<link rel="stylesheet" href="../css/wpl_style.css">
	<link rel="stylesheet" href="../css/bootstrap.min.css">
	<link rel="stylesheet" href="../css/datepicker.css">
	<script src="../js/jquery-1.11.1.min.js"></script>
	<script src="../js/bootstrap.min.js"></script>
	<script src="../js/bootstrap-datepicker.js"></script>
	<?php include './dbInclude.php';?>
    <style>
   </style>
   <title>Online Stock Market</title>
  </head>
<?php
  ob_start();
    session_start();
    if(isset($_SESSION['sess_client_id']) && !empty($_SESSION['sess_client_id'])) {
		$clid = $_SESSION['sess_client_id'];
		$rows12=$dbh->query("select * from user_master where CLIENT_ID = ".$clid.";");
		
		$name = "";
		foreach ($rows12 as $row) {
		$name = $row["FIRST_NAME"];
		}
	?>
  <body>
    <div class="container" id="container">
		<div id="header">
			<div id ="logo">
			<a href="./homeScreen.php">
			<img src="../images/PM9RTp1416879776.png"> </img>
			</a>
			</div>
			<div id ="headName">
			<div style="margin-left:0%;"><h3><span style="color:#A9D5FF;font-weight:bold;font-family:Arial;">Online Stock Market Trading</span></h3></div>
			<div style="margin-left:75%;margin-top:-3%;font-family : sans-serif;color :white;">
				<table style="color:white;"><tr><td>Hello, <?php echo $name;?></td><td >&nbsp;&nbsp;&nbsp;<a href="logout.php">Logout</a></td></tr>
				<tr><td colspan="2">&nbsp;</td></tr>
				<tr><td colspan="2"><span id="balref" style="cursor:pointer;">Balance : <span id="fillbel"></span></span></td></tr>
				</table>
			</div>
			</div>
		</div>
		<div id="content">

		
			<div class="row_grid">
			  <div class="coll-1-2"><iframe src="marketWatch.php" class="gridiFrame" id="mrktwtch"></iframe></div>
			  <div class="coll-1-2"><iframe src="portfolio.php" id="portfolio" class="gridiFrame"></iframe></div>
			</div><!-- /.row -->

			<div class="row_grid">
			  <div class="coll-1-2"><iframe src="orderpanel.php" id="orderPanel" class="gridiFrameOrderPanel"></iframe></div>
			  <div class="coll-1-2"><iframe src="order_history.php" id="portfolio" class="gridiFrameOrderPanel"></iframe></div>
			</div><!-- /.row -->
		

		</div>
		
	<div class="footer_bg"><!-- start footer -->
			<div class="container">
				<div class="row  footer">
					<div class="copy text-center">
						<p class="link"><span>&#169; All rights reserved | Design by&nbsp;<a href="../about.html"> TEAM 11</a></span></p>
					</div>
				</div>
			</div>
	</div>
		
    </div>

    
  </body>
  <script>
  $(document).ready(function(){
  $('#dp3').datepicker();

    $("#balref").click(function(){
	$.ajax({
  type: "POST",
  url: "ajax_balref.php",
  
})
  .done(function( data ) {
	//alert(data);
	$("#fillbel").empty();
    $("#fillbel").html(data);
	
	});
  });
    $("#balref").click();
  });
 

  </script>
  <?php
  }
  else
  {
	header('Location: ../index.php?msg=please login to continue');
  }
  ?>
</html>
